﻿using MES.Desktop.Entities;
using MES.Desktop.IDataAccess;
using MES.Desktop.IService;
using MES.Desktop.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MES.Desktop.Service
{
    public class AuthServer : ServiceBase, IAuthServer
    {
        IAuthAccess _authAccess;
        public AuthServer(IAuthAccess authAccess)
        {
            _authAccess = authAccess;
        }
        public string AuthAccount(UserEntity user)
        {
            var result = _authAccess.AuthAccount(JsonUtil.Serializer(user));

            return this.GetResult<string>(result);
        }
    }
}
